import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { InvoiceComponent } from './pages/invoice/invoice.component';
import { InvoiceDetailComponent } from './pages/invoice-detail/invoice-detail.component';
import { InvoiceInventoryDetailComponent } from './pages/Invoice _inventory-detail/Invoice _inventory-detail.component';
import { InvoiceInventoryComponent } from './pages/Invoice _inventory/Invoice _inventory.component';
import { NoteComponent } from './pages/note/note.component';
import { NoteDetailComponent } from './pages/note-detail/note-detail.component';
const routes: Routes = [
    {
        path: 'invoice',
        component: InvoiceComponent,
        data: { breadcrumbs: [{ title: '发票管理' }] },
        children: [
            {
                path: 'detail/:id',
                component: InvoiceDetailComponent,
                data: { breadcrumbs: [{ title: '仓库盘点列表', path: '/fullname/inventory' }, { title: '盘点详情' }] },
            },
            {
                path: 'detail',
                component: InvoiceDetailComponent,
                data: { breadcrumbs: [{ title: '仓库盘点列表', path: '/fullname/inventory' }, { title: '添加盘点' }] },
            },
        ]
    },
    {
        path: 'add',
        component: InvoiceInventoryComponent,
        children: [
            {
                path: 'detail', component: InvoiceInventoryDetailComponent, data: {
                    breadcrumbs: [{ title: '库存报损列表', path: '/fullname/reported' }, { title: '添加报损' }]
                },
            },
            {
                path: 'detail/:id', component: InvoiceInventoryDetailComponent, data: {
                    breadcrumbs: [{ title: '库存报损列表', path: '/fullname/reported' }, { title: '报损详情' }]
                }
            },
        ],
        data: {
            breadcrumbs: [{ title: '库存报损列表' }]
        }
    },
    {
        path: 'note',
        component: NoteComponent,
        children: [
            {
                path: 'detail', component: NoteDetailComponent, data: {
                    breadcrumbs: [{ title: '发票库存列表', path: '/fullname/reported' }, { title: '添加发票' }]
                },
            },
            {
                path: 'detail/:id', component: NoteDetailComponent, data: {
                    breadcrumbs: [{ title: '发票库存列表', path: '/fullname/reported' }, { title: '发票详情' }]
                }
            },
        ],
        data: {
            breadcrumbs: [{ title: '发票库存列表' }]
        }
    },

];

export const declarationComponents = [
    InvoiceComponent,
    InvoiceDetailComponent,
    InvoiceInventoryComponent,
    InvoiceInventoryDetailComponent,
    NoteComponent,
    NoteDetailComponent
];

export const entryComponents = [
];

@NgModule({
    imports: [
        RouterModule.forChild(routes)
    ],
    exports: [
        RouterModule
    ]
})
export class InvoiceRoutingModule { }
